Add support for generating a Make compatible depfile#41
Add support for generating a Make compatible depfile#41dcbaker wants to merge 3 commits intoaradi:mainfrom
Conversation
aradi
left a comment
There was a problem hiding this comment.
This is a very nice addition, thanks! The only thing I am somewhat unsure about is the escaping, see my comments below.
|
Updated with the requested changes. I've also updated the test case, and added a couple of more cases, including one to explicitly test the escaping behavior. |
This allows executing the unittests directly with `python test_fypp.py`, which allowing easily passing options into the test harness. It also avoids having to know if user has set PYTHONPATH, since it will be evaluated after PYTHONPATH.
This allows build systems that can consume them (Make and Ninja, in particular) to figure out at build time which files are implicitly included in the dependency graph of a fypp output. This means for example if you have a target that includes two other files, an incremental rebuild can be triggered automatically if one of the included files are modified.
|
I've rebased this across the recent code reorganization |
|
OK, perfect (and sorry for the long delay times). I think everything is fine so far, and the PR should be merged. I have one only API design question: What is the advantage of not writing the depfile already during the At the first glance, it seems more logical to me, to write the depfile during the |
This allows fypp to communicate to build systems like Make and Ninja (including through build system generators like CMake and Meson) files that need to be implicitly included in the build graph. This is important for getting correct incremental rebuilds when such a file is changed.